﻿using Admin.NET.Core;
using SqlSugar;
using System.ComponentModel.DataAnnotations;


namespace IotFun.Views.EquipInfoView.Dto;

/// <summary>
/// 设备管理基础输入参数
/// </summary>
public class EquipInfoBaseInput
    {
        /// <summary>
        /// 名称
        /// </summary>
        public virtual string name { get; set; }
        
        /// <summary>
        /// 分组Id
        /// </summary>
        public virtual long groupid { get; set; }
        
        /// <summary>
        /// 程序Id
        /// </summary>
        public virtual long programid { get; set; }
        
        /// <summary>
        /// IP端口
        /// </summary>
        public virtual string ipaddress { get; set; }
        
        /// <summary>
        /// 是否启用
        /// </summary>
        public virtual int isenable { get; set; }
        
        /// <summary>
        /// 编号
        /// </summary>
        public virtual string num { get; set; }

    /// <summary>
    /// 绑定单元号
    /// </summary>
    public string UnitNum { get; set; }

    /// <summary>
    /// 绑定节点号
    /// </summary>
    public string BindNum { get; set; }
    /// <summary>
    /// 排序
    /// </summary>
    public int ordernum { get; set; }

    /// <summary>
    /// 协议类型
    /// </summary>
    public string ProtobufType { get; set; }

    /// <summary>
    /// 轮询时间
    /// </summary>
    public virtual int pooling { get; set; }
    /// <summary>
    /// 解析方向
    /// </summary>
    public virtual string readdirection { get; set; }

    /// <summary>
    /// 设备类型
    /// </summary>
    public virtual string equiptype { get; set; }
        
        /// <summary>
        /// 名称
        /// </summary>
        public virtual string remark { get; set; }


    public int IsMqttPublish { get; set; }

}

    /// <summary>
    /// 设备管理分页查询输入参数
    /// </summary>
    public class EquipInfoInput : BasePageInput
    {
        /// <summary>
        /// 名称
        /// </summary>
        public string name { get; set; }
        
        /// <summary>
        /// 分组Id
        /// </summary>
        public long groupid { get; set; }
        
        /// <summary>
        /// 程序Id
        /// </summary>
        public long programid { get; set; }
        
       
         public int OrderNum { get; set; }
        /// <summary>
        /// 设备类型
        /// </summary>
        public string equiptype { get; set; }
    /// <summary>
    /// 设备协议
    /// </summary>
    public string protobuftype { get; set; }

    public int? isEnable { get; set; }

}

    /// <summary>
    /// 设备管理增加输入参数
    /// </summary>
    public class AddEquipInfoInput : EquipInfoBaseInput
    {
    }

    /// <summary>
    /// 设备管理删除输入参数
    /// </summary>
    public class DeleteEquipInfoInput : BaseIdInput
    {
        /// <summary>
        /// Id
        /// </summary>
        [Required(ErrorMessage = "Id不能为空")]
        public long id { get; set; }
        
    }

    /// <summary>
    /// 设备管理更新输入参数
    /// </summary>
    public class UpdateEquipInfoInput : EquipInfoBaseInput
    {
        /// <summary>
        /// Id
        /// </summary>
        [Required(ErrorMessage = "Id不能为空")]
        public long id { get; set; }
        
    }

    /// <summary>
    /// 设备管理主键查询输入参数
    /// </summary>
    public class QueryByIdEquipInfoInput : DeleteEquipInfoInput
    {

    }
